package com.fengye.user.util;

import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;

public class ServletContextHolder {
    private static ThreadLocal<HttpServletRequest> threadLocal = new ThreadLocal<>();

    public static void set(HttpServletRequest httpServlet) {
        threadLocal.set(httpServlet);
    }

    public static HttpServletRequest get() {
        return threadLocal.get();
    }

    public static void remove() {
        threadLocal.remove();
    }
}
